<?php
    namespace  app\admin\validate;
    use think\Validate;
    class Friends extends  Validate
    {
        protected $rule = [
            'friends_name'=>'require|max:10|chsAlphaNum',
            'friends_path'=>'require|unique:friends|url',
            'friends_status'=>'require',
    ];
        protected $message  =[
            'friends_name.require'=>'标题必须填写',
            'friends_name.max'=>'标题最多数字为10',
            'friends_name.chsAlphaNum'=>'只能是汉字、字母和数字',
           'friends_path.require'=>'路径必须填写',
            'friends_path.unique'=>'已添加过',
            'friends_path.url'=>'请填写有效的URL地址',
            'friends_status.require'=>'状态必须填写',

        ];
    }